import rxAjax from '@/assets/js/ajax.js';

//KETTLE任务调度 api接口
export const SysKettleJobApi = {};

SysKettleJobApi.baseUrl= '/api-system/system/core/sysKettleJob';
SysKettleJobApi.exportUrl= SysKettleJobApi.baseUrl + '/listExport';

//查询列表
SysKettleJobApi.query=function (parameter) {
  var url= SysKettleJobApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
SysKettleJobApi.get =function(pkId) {
  var url= SysKettleJobApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
SysKettleJobApi.save =function(parameter) {
  var url= SysKettleJobApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
SysKettleJobApi.del =function(parameter) {
  var url= SysKettleJobApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

export  default SysKettleJobApi;

